/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/idenger">idenger</a> All rights reserved.
 */
package com.idenger.modules.edu.service.order;

import java.util.List;

import com.idenger.common.service.CrudService;
import com.idenger.modules.edu.entity.order.EduOrder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.idenger.common.persistence.Page;
import com.idenger.modules.edu.dao.order.EduOrderDao;

/**
 * 订单Service
 * @author 兰正军
 * @version 2017-12-12
 */
@Service
@Transactional(readOnly = true)
public class EduOrderService extends CrudService<EduOrderDao, EduOrder> {

	public EduOrder get(String id) {
		return super.get(id);
	}
	
	public List<EduOrder> findList(EduOrder eduOrder) {
		return super.findList(eduOrder);
	}
	
	public List<EduOrder> findListByDetails(EduOrder eduOrder) {
		return dao.findListByDetails(eduOrder);
	}
	
	public Page<EduOrder> findPage(Page<EduOrder> page, EduOrder eduOrder) {
		return super.findPage(page, eduOrder);
	}
	
	public Page<EduOrder> findListByDetails(Page<EduOrder> page, EduOrder eduOrder) {
		return super.findListByDetails(page, eduOrder);
	}
	
	@Transactional(readOnly = false)
	public void save(EduOrder eduOrder) {
		super.save(eduOrder);
	}
	
	@Transactional(readOnly = false)
	public void delete(EduOrder eduOrder) {
		super.delete(eduOrder);
	}
	
	@Transactional(readOnly = false)
	public void updateOrderForUserId(String updUserId,String userId){
		dao.updateOrderForUserId(updUserId, userId);
	}
	
	public EduOrder findOrderByTradeNo(String tradeNo){
		return dao.findOrderByTradeNo(tradeNo);
	}
	
	public String statisticsPrice(){
		return dao.statisticsPrice();
	}
}